<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

use think\facade\Route;

Route::get('/', function () {
    return "<h1>Hello, world!</h1>";
});

Route::group('v1',function () {
    Route::resource('question', app\v1\controller\Question::class);
    Route::resource('country', app\v1\controller\Country::class);
    Route::resource('user', app\v1\controller\User::class);
    Route::resource('answer', app\v1\controller\Answer::class);
    Route::resource('questionOptionResult', app\v1\controller\QuestionOptionResult::class);
    Route::get('getLastResultByUser/:id', 'v1/User/getLastResultByUser');
});
Route::group('admin',function () {
    Route::get('/', 'admin/index/index')->name('admin.index');
    Route::get('/userTestHistory', 'admin/index/userTestHistory')->name('admin.user_test_history');
    Route::get('login', 'admin/login/index')->name('admin.login');
    Route::post('login', 'admin/login/login')->name('admin.login');
});
return [

];
